﻿using System;
using System.Collections.Generic;
using System.Data.Common;

namespace HYFamilyLibDataManager
{
	public interface IFamilyTable
	{
		bool Add(DbCategory category, DbFamily family, DbTransaction tr);

		bool Remove(DbFamily family);

		bool Update(DbFamily family);

		void ReDateByNow(DbFamily family);

		DbFamily this[Guid id]
		{
			get;
		}

		DbFamily this[string name]
		{
			get;
		}

		List<DbFamily> this[Parent parent, CheckType checkType]
		{
			get;
		}

		List<DbFamily> this[Parent parent, int start, int end, CheckType checkType]
		{
			get;
		}

		int Count(Parent parent, CheckType checkType);

		int Count(CheckType checkType);

		List<DbFamily> GetAll();

		List<DbFamily> SearchFamily(List<string> keys);

		List<DbFamily> SearchFamily(string familyName);

		List<DbFamily> SearchFamily(DateTime startTime, DateTime endTime);

		int SearchFamilyCount(DateTime startTime, DateTime endTime);

		List<DbFamily> SearchFamily(DateTime startTime, DateTime endTime, int start, int end);

		int SearchFamilyCount(string familyName);

		List<DbFamily> SearchFamily(string familyName, int start, int end);
	}
}
